#include <stdio.h>
#include <tchar.h>
#include <windows.h>

int CDECL MessageBoxPrintf(TCHAR* caption, TCHAR* format, ...) {
	va_list arglist;
	va_start(arglist, format);
	TCHAR buf[1024] = { 0 };
	_vsntprintf_s(buf, sizeof(buf) / sizeof(TCHAR), format, arglist);
	va_end(arglist);
	return MessageBox(NULL, buf, caption, 0);
}

void PrintScreenSize() {
	int xsize = GetSystemMetrics(SM_CXSCREEN);
	int ysize = GetSystemMetrics(SM_CYSCREEN);
	MessageBoxPrintf(TEXT("ScreenSize"), TEXT("The screen is %i pixels wide by %i pixels high."), xsize, ysize);
	return;
}